<template>
    <view class="specializedDiseases h-402 ph-28 pv-28">
        <view class="f jc-s-b ai-c">
            <view class="fs-36 fw-600 text-color4">专科专病</view>
            <view class="f ai-c" @click="toDoctor">
                <view class="fs-24 text-color3 mr-9"> 更多</view>
                <u-icon name="arrow-right" size="10" color="#999"></u-icon>
            </view>
        </view>
        <view class="f mt-16 menu fc-w">
            <view class="f ai-c jc-c menu-box w-202 h-80 mr-12 mb-20" v-for="(item, index) in departmentList" :key="index" @click="toLi(item)">
                <image :src="item.remark" class="w-32 h-32"></image>
                <view class="fs-28 text-color4 ml-12">{{ item.value }}</view>
            </view>
        </view>
    </view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { categoryList, listParentcodes } from '@/services/api/index/index';
import { dictDataType } from '@/services/api/dict';

const departmentList = ref([]);
// getContentPage()
getDictDataType()
async function getContentPage() {
    const { data } = await listParentcodes({scope:2,petType:'0,1'});
	// list.value = data
}
async function getDictDataType() {
    const { data } = await dictDataType({ type: 'common_doctor_dept' });
    departmentList.value = data;
}
const toDoctor = () => {
    uni.navigateTo({
        url: '/pages_index/doctor',
    });
};
function toLi(item:any){
    uni.navigateTo({
        url: '/pages_index/doctor?department='+item.id+'&name='+item.label,
    });
};

</script>
<style lang="scss" scoped>
.specializedDiseases {
    background: #fff;
    border-radius: 24px;
    .menu {
        .menu-box {
            background: #f8f8f8;
            border: 1px solid #dddddd;
            border-radius: 12px;
        }
        .menu-box:nth-child(3n) {
            margin-right: 0;
        }
    }
}
</style>
